package Vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextPane;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class RegistrarUmpire extends javax.swing.JFrame {
	private JButton btnGuardar;
	private JButton btnSalir;
	private JTextPane txtFechaNac;
	private JTextPane txtApellidoUmpire;
	private JTextPane txtCedulaUmpire;
	private JTextPane txtNombreUmpire;
	private JLabel lblFechaNac;
	private JLabel lblApellidoUmpire;
	private JLabel lblNombreUmpire;
	private JLabel lblCedulaUmpire;

	/**
	* Auto-generated main method to display this JFrame
	*/
		
	public RegistrarUmpire() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			{
				btnGuardar = new JButton();
				getContentPane().add(btnGuardar);
				btnGuardar.setText("Guardar");
				btnGuardar.setBounds(132, 220, 68, 23);
			}
			{
				btnSalir = new JButton();
				getContentPane().add(btnSalir);
				btnSalir.setText("Salir");
				btnSalir.setBounds(226, 220, 68, 23);
			}
			{
				lblCedulaUmpire = new JLabel();
				getContentPane().add(lblCedulaUmpire);
				lblCedulaUmpire.setText("Cedula:");
				lblCedulaUmpire.setBounds(12, 20, 66, 16);
			}
			{
				lblNombreUmpire = new JLabel();
				getContentPane().add(lblNombreUmpire);
				lblNombreUmpire.setText("Nombre:");
				lblNombreUmpire.setBounds(12, 65, 66, 16);
			}
			{
				lblApellidoUmpire = new JLabel();
				getContentPane().add(lblApellidoUmpire);
				lblApellidoUmpire.setText("Apellido:");
				lblApellidoUmpire.setBounds(208, 65, 68, 16);
			}
			{
				lblFechaNac = new JLabel();
				getContentPane().add(lblFechaNac);
				lblFechaNac.setText("Fecha de Nacimiento:");
				lblFechaNac.setBounds(12, 104, 143, 16);
			}
			{
				txtNombreUmpire = new JTextPane();
				getContentPane().add(txtNombreUmpire);
				txtNombreUmpire.setBounds(78, 65, 95, 22);
			}
			{
				txtCedulaUmpire = new JTextPane();
				getContentPane().add(txtCedulaUmpire);
				txtCedulaUmpire.setBounds(78, 22, 95, 22);
			}
			{
				txtApellidoUmpire = new JTextPane();
				getContentPane().add(txtApellidoUmpire);
				txtApellidoUmpire.setBounds(267, 65, 92, 22);
			}
			{
				txtFechaNac = new JTextPane();
				getContentPane().add(txtFechaNac);
				txtFechaNac.setBounds(154, 106, 115, 22);
			}
			pack();
			this.setSize(482, 300);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

	public String getTxtFechaNac() {
		return txtFechaNac.getText();
	}

	public String getTxtApellidoUmpire() {
		return txtApellidoUmpire.getText();
	}

	public String getTxtCedulaUmpire() {
		return txtCedulaUmpire.getText();
	}

	public String getTxtNombreUmpire() {
		return txtNombreUmpire.getText();
	}

	public void AgregarAL(ActionListener action) {
		this.btnGuardar.addActionListener(action);
		this.btnSalir.addActionListener(action);
		}
	
	public void mostrarMensaje(String mensaje){
		JOptionPane.showMessageDialog(this, mensaje);
	}
	
}
